﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zj.OpenAuth.Domain.Core
{
    /// <summary>
    /// user
    /// </summary>
    public class User : BaseEntity
    {

        public User()
        {
            this.Account = string.Empty;
            this.RealName = string.Empty;
            this.Password = string.Empty;
            this.Phone = "xxxx-xxxxxxxx";
            this.Mobile = "xxxxxxxxxxx";
            this.Address = string.Empty;
            this.Email = "xxxxxxxxx@163.com";
            this.QQ = 519564415;
            this.WeChat = "WXxxxxxxxxxxx";
            this.Sex = SexEnum.Other;
            this.Description = $"创建于{DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss")}";
            this.Status = StatusEnum.Normal;
            this.CreatorId = 1;
            this.CreateTime = DateTime.Now;
            this.LastModifierId = null;
            this.LastModifyTime = null;
            this.Code = this.Account ;
        }
        public string Code { get; set; }



        public string Account { get; set; }


        public string RealName { get; set; }



        public string Password { get; set; }


        public string Phone { get; set; }



        public string Mobile { get; set; }



        public string Address { get; set; }



        public string Email { get; set; }



        public long QQ { get; set; }



        public string WeChat { get; set; }


        public SexEnum Sex { get; set; }



        public StatusEnum Status { get; set; }


        public string Description { get; set; }



        public int? DepartmentId { get; set; }



        public int? CreatorId { get; set; }



        [DataType(DataType.DateTime)]
        public DateTime CreateTime { get; set; }



        public int? LastModifierId { get; set; }



        [DataType(DataType.DateTime)]
        public DateTime? LastModifyTime { get; set; }
    }
}